package com.lrkj.payfee.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.lrkj.common.annotation.Excel;
import com.lrkj.common.core.domain.BaseEntity;
import com.lrkj.payfee.vo.TooReceiptVo;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 付款单对象 tb_advice_payment
 *
 * @author yajun_ren
 * @date 2022-03-26
 */
@Data
public class AdvicePayment extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 主键ID
     */
    private String id;

    /**
     * 单号
     */
    @Excel(name = "单号")
    private String no;

    /**
     * 付款人ID
     */
    @Excel(name = "付款人ID")
    private String paymentUserId;

    /**
     * 付款人名称
     */
    @Excel(name = "付款人名称")
    private String paymentUserName;

    /**
     * 付款日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "付款日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date paymentTime;

    /**
     * 付款金额
     */
    @Excel(name = "付款金额")
    private BigDecimal paymentMoney;

    /**
     * 房间id
     */
    @Excel(name = "房间id")
    private String roomId;

    /**
     * 客户名称
     */
    @Excel(name = "客户名称")
    private String customName;

    /**
     * 客户IDs
     */
    @Excel(name = "客户IDs")
    private String customIds;

    /**
     * 状态
     */
    @Excel(name = "状态")
    private String status;

    /**
     * 祖父ID
     */
    @Excel(name = "祖父ID")
    private String ancestors;

    /**
     * 结账期间
     */
    @Excel(name = "结账期间")
    private String fiscalPeriod;

    //收款单明细列表
    private List<TooReceiptVo> tooReceiptVos;

    //付款单明细列表
    private List<AdvicePaymentDetail> advicePaymentDetails;

    //预收单列表
    private List<AdvanceReceipt> advanceReceipts;

    //房屋名称
    private String roomName;
    //小区名称
    private String communityName;

    //业务类型
    private String businessType;

    private String communityId;

    //转存金额
    private BigDecimal transferAmount;

    //付款方式
    List<AdvicePaymentMode> modePayments;

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("no", getNo())
                .append("paymentUserId", getPaymentUserId())
                .append("paymentUserName", getPaymentUserName())
                .append("paymentTime", getPaymentTime())
                .append("paymentMoney", getPaymentMoney())
                .append("roomId", getRoomId())
                .append("customName", getCustomName())
                .append("customIds", getCustomIds())
                .append("status", getStatus())
                .append("ancestors", getAncestors())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .append("remark", getRemark())
                .append("fiscalPeriod", getFiscalPeriod())
                .toString();
    }
}
